<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../../../css/index.css" />
</head>
<style>
	.warp{width: 100%;}
    #menu{background: url(../../../image/main0/msg.png) no-repeat right 15px center;background-size: 20px;}
    #msgRed{width:9px;height:9px;background: #F44C30;border-radius: 50%;border: 1px solid #ffffff;position: absolute;right: 14px;top: 13px;box-sizing: border-box;}

    .head-warp{background:url(../../../image/main3/main3_bg.png) no-repeat center #FF9502;background-size:100% auto;}
	/*头部信息*/
	.head-box{width: 100%;padding-bottom: 40px;box-sizing: border-box;}
	.head-box .top-box{width: 100%;align-items:center;padding: 0 15px 15px 15px;box-sizing: border-box;}
    .head-box .top-box .cont{flex-direction: column;padding-top: 20px;}
	.head-box .top-box .cont .name{font-size: 18px;color: #FFFFFF;box-sizing: border-box;font-weight: 700;width: 100%;height: 26px;}
    .head-box .top-box .cont .addr{font-size: 14px;color: #FFFFFF;height: 20px;}

    /*销售数据*/
    .num-box{width: 100%;padding: 18px 15px 25px 15px;box-sizing: border-box;color: #ffffff;justify-content: space-between;}
    .num-box .num-one{flex-direction: column;align-items: center;}
    .num-box .num-one .num{font-size: 14px;}
    .num-box .num-one .num i{font-size: 20px;font-weight: bold;}
    .num-box .num-one .t{font-size: 14px;}

	/*跳转类表*/
	.info-list{margin-bottom: 10px;margin: 0 15px;box-sizing: border-box;border-radius: 4px;padding: 10px;flex-wrap: wrap;background: #ffffff;margin-top: -40px;position: relative;}
	.info-list .info-one{width: 33.3%;height: 100px;flex-direction: column;align-items: center;justify-content: center;border-radius: 4px;}
	.info-list .info-one img{width: 32px;height: 32px;}
	.info-list .info-one .text{box-sizing: border-box;font-size: 14px;color: #666666;line-height: 20px;height: 20px;padding-top: 10px;}
    .info-list .info-one:active{background:#fafafa;}

</style>
<body>
    <div id="vue" class="warp">

    	<!--个人中心头部信息-->
        <div class="head-warp">
            <div id="app-header">
        		<div class="headbar">
        	        <div class="toolbar">
        				<div class="lf tool" tapmode="tapcss" onclick="backMenu(this);"><span class="back b"></span></div>
        				<div class="title han_1"><span id="title"></span></div>
        				<div class="rt tool menu" id="menu" tapmode onclick="menuClick(this);">
        				    <div class="red" id="msgRed" style="display:none;"></div>
        				</div>
        	        </div>
        		</div>
            </div>
    		<div class="head-box">
    			<div class="top-box">
                    <div class="cont">
                        <div class="name" v-text="Pdata.name"></div>
                        <div class="addr han_1">地址：<i v-text="Pdata.citystr"></i><i v-text="Pdata.address"></i></div>
                    </div>
    			</div>
                <div class="num-box flex">
                    <div class="num-one flex" tapmode onclick="open_wallet(this)" data-type="company" data-title="我的钱包" data-url="main3/money/wallet.html">
                        <div class="num"><i v-text="Pdata.money">0.00</i>元</div>
                        <div class="t">我的钱包</div>
                    </div>
                    <div class="num-one flex" tapmode onclick="open_xiaoshou(this)" data-type="company" data-sta="0" data-title="销售额" data-url="main3/money/xiaoshou.html">
                        <div class="num"><i v-text="Pdata.today_sale_price">0</i>元</div>
                        <div class="t">今日销售额</div>
                    </div>
                    <div class="num-one flex" tapmode onclick="open_xiaoshou(this)" data-type="company" data-sta="1" data-title="销售额" data-url="main3/money/xiaoshou.html">
                        <div class="num"><i v-text="Pdata.old_sale_price">0</i>元</div>
                        <div class="t">历史销售额</div>
                    </div>
                </div>
    		</div>
        </div>

		<!--跳转列表-->
		<div class="info-list flex">
			<div class="info-one flex" tapmode onclick="open_order(this)" data-title="订单管理" data-url="main3/company/ordert_list.html">
				<img src="../../../image/main3/store/store_goto1.png"/>
				<div class="text">订单管理</div>
			</div>
            <div class="info-one flex" tapmode onclick="open_goods(this)" data-title="商品管理" data-type="shop" data-url="main3/company/goods.html">
				<img src="../../../image/main3/store/store_goto2.png"/>
				<div class="text">商品管理</div>
			</div>
			<div class="info-one flex" tapmode onclick="open_goods(this)" data-title="积分商品管理" data-type="jifen" data-url="main3/company/goods.html">
				<img src="../../../image/main3/store/store_goto3.png"/>
				<div class="text">积分商品管理</div>
			</div>
            <div class="info-one flex" tapmode onclick="open_tongji(this)" data-title="分润统计" data-url="main3/money/tongji.html">
                <img src="../../../image/main3/store/store_goto7.png"/>
                <div class="text">分润统计</div>
            </div>
            <div class="info-one flex" tapmode onclick="open_page(this)" data-type="company" data-title="我的银行卡" data-url="main3/bank/bankcard.html">
				<img src="../../../image/main3/store/store_goto4.png"/>
				<div class="text">我的银行卡</div>
			</div>
		</div>

    </div>
</body>
<script type="text/javascript" src="../../../script/base.min.js" id="loadjs" data-js="L/swiper.min,L/lazyload,L/h-tool"></script>
<script type="text/javascript">

	define(function (require, exports, module) {
        lanYun.indexSetHeader('app-header');
        lanYun.getListDate();

        //获取用户数据
        _page.getData = function(loading) {
			lanYun.getVueData({url:'company/Home/index',get:{page:lanYun.page},cache:0,loading:loading},function(ret) {
				//console.log(JSON.stringify(ret));
			});
		};

        lanYun.newVue('#vue',{
        },function() {
            _page.getData(2);
        });

        // 设置红点
        setMsgRed = function(){
            var udata = lanYun.getUdata();
            if(!udata) return;
            //console.log('执行了消息函数');
            if(udata.newmsg == 1){
                $('#msgRed').show();
            }else {
                $('#msgRed').hide();
            }
        };
        setMsgRed();

		//打开页面
		open_page = function (tis) {
	        var dst = tis.dataset;
	        lanYun.openWin(dst.url, {
	            win:'win',
	           	title:dst.title,
	            frameParam : dst
	       });
	    }

        //打开分润统计
		open_tongji = function (tis) {
	        var dst = tis.dataset;
	        lanYun.openWin(dst.url, {
	            win:'win_jf',
	           	title:dst.title,
	            frameParam : dst
	       });
	    }

        //打开销售额
		open_xiaoshou = function (tis) {
	        var dst = tis.dataset;
	        lanYun.openWin(dst.url, {
	            win:'win_jf',
	           	title:dst.title,
	            frameParam : dst
	       });
	    }

        //打开我的钱包
		open_wallet = function (tis) {
	        var dst = tis.dataset;
	        lanYun.openWin(dst.url, {
	            win:'none',
	           	title:dst.title,
	            frameParam : dst
	       });
	    }

        //打开我的订单
        open_order = function (tis) {
	        var dst = tis.dataset;
	        lanYun.openWin(dst.url, {
	            win:'win',
	           	title:dst.title,
                menu:"<i style='color:#FF9502'>筛选</i>",
	            frameParam : dst
	       });
	    }

        //商品管理
        open_goods = function (tis) {
	        var dst = tis.dataset;
	        lanYun.openWin(dst.url, {
	            win:'win_goods',
	           	title:'',
	            frameParam : dst
	       });
	    }

        //页面关闭方法
        backMenu = function (tis){
            api.closeWin();
        }

        //页面关闭方法
        menuClick = function (tis){
            $('#msgRed').hide();
            lanYun.openWin('main0/list_msg.html', {
	            win:'win',
	           	title:'消息',
                menu:"全部已读",
	            frameParam : {}
	       });
        }

	});


</script>

</html>
